home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 19
/
CU Amiga Magazine's Super CD-ROM 19 (1998)(EMAP Images)(GB)[!][issue 1998-02].iso
/
CUCD
/
Utilities
/
Scion
/
ARexx
/
FixLastNames.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-09-24
|
2KB
|
70 lines
/****************************************************************************/
/* */
/* FixLastNames.rexx */
/* */
/* Written by: Peter Billing, RMB 1240, Yinnar 3869, Australia */
/* */
/* Last saved: Wednesday 29-Sep-93 */
/* */
/* This script should FIND and REPLACE a given LAST name in the SCION */
/* database. */
/* */
/****************************************************************************/
options results
/*test = show('P','SCIONGEN')
then
say
say "I am sorry to say that the SCION Genealogist database is not available."
say "Please start the SCION program BEFORE using this script."
say
exit */
myport = "SCIONGEN"
address value myport
getdbname
dbname = upper(result)
say ""
say "The current database name is " dbname
say
say "This script will FIND and REPLACE all Last Names you ask for"
say "with a NEW one given by you. Just press RETURN to exit."
say
writech(stdout, "What LAST name you would like replaced? ")
pull findname
if findname = "" then exit
say
say "EVERYTHING after and including" findname "will be deleted"
say "What is the replacement LAST NAME."
pull replacename
say
gettotalirn
total = result
t=0
say "Hang on there are "total" LAST names to check."
do x = 1 to total
getlastname x
FixLastName(result)
putlastname x name
if x/5 = x%5 then writech(stdout,".")
end
say
say "I changed a total of "t" LAST names."
say
say "Do not forget to save the new "dbname" database."
say
exit
FixLastName:
parse arg name
a = 0
a = pos(findname,name)
if a > 0 then do
name = delstr(name,a)
name = insert(replacename,name,a-1)
t = t + 1
end
return name t